package com.hbpu.encap.homework;

public class Homework02 {
    public static void main(String[] args) {
        Teacher teacher = new Professor("mike", 35, "Professor", 3500);
        System.out.println(teacher.introduce());
    }
}

class Teacher {
    private String name;
    private int age;
    private String post;
    private double sal;

    public Teacher(String name, int age, String post, double sal) {
        this.name = name;
        this.age = age;
        this.post = post;
        this.sal = sal;
    }

    public double getSal() {
        return sal;
    }

    public String introduce() {
        return "Teacher：" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", post='" + post + '\'';
    }
}

class Professor extends Teacher {
    public Professor(String name, int age, String post, double sal) {
        super(name, age, post, sal);
    }

    @Override
    public String introduce() {
        return super.introduce() + ", salary=" + super.getSal() * 1.3;
    }
}

class AssociateProfessor extends Teacher {
    public AssociateProfessor(String name, int age, String post, double sal) {
        super(name, age, post, sal);
    }

    @Override
    public String introduce() {
        return super.introduce() + ", salary=" + super.getSal() * 1.2;
    }
}

class Tutors extends Teacher {
    public Tutors(String name, int age, String post, double sal) {
        super(name, age, post, sal);
    }

    @Override
    public String introduce() {
        return super.introduce() + ", salary=" + super.getSal() * 1.1;
    }
}
